# @Desc    : 使用streamlit+pyecharts 可视化数据分析
# @Author  : meihongliang  
# @Time    : 2025-02-16 12:36

import streamlit as st

from streamlit_echarts import st_pyecharts
import datautil as dautil

st.set_page_config(
    layout="wide",
    page_title="lose weight",
    page_icon="./golang1.png"
)  # 设置宽模式

# 在页面开始时添加CSS来隐藏右上角的组件
st.markdown("""
<style>
    #MainMenu {visibility: hidden;}
    footer {visibility: hidden;}
    header {visibility: hidden;}
    .stTitle {
        text-align: center;
    } 
    .stMainBlockContainer {
        padding-top: 0px;  # 我改你主容器的上边距不就完事儿了
    }
</style>
""", unsafe_allow_html=True)


class lose_weight:
    def __init__(self):
        st.title("LOSE WEIGHT")

        st.divider()
        line = dautil.year_weight()
        st_pyecharts(line, height="500px", width="100%")

        st.divider()

        heart_rate_line = dautil.running_heart_rate()
        st_pyecharts(heart_rate_line, height="500px", width="100%")


if __name__ == '__main__':
    lose_weight()
